@extends('admin._layouts.default')

@section('main')

      <div class="row-fluid ">
        <div class="box gradient">
          <div class="title">
            <h3><a href="qr_index.html"  class="btn btn-mini pull-right" style="margin:5px 5px 0 0"><i class="fa fa-hand-o-left"></i> 返回</a>
            <i class="fa fa-qrcode"></i><span>批量生成二维码</span>
            </h3>
          </div>
          <div class="content">
            {{ Form::open(array('route' => 'admin.codes.store','id'=>'cities','class'=>'form-horizontal')) }}
                  <div class="control-group">
                    <label class="control-label" for="keyword">型号</label>
                    <div class="controls">
                    <select data-placeholder="选择型号..." name="machine" class="chzn-select span4" id="default-select">
                    <option value="0">选择型号...</option>
                    @foreach($machines as $machine)
                    <option value="{{ $machine->id }}">{{ $machine->name }}</option>
                    @endforeach
                    </select>
                    </div>
                  </div>
                  <div class="control-group">
                    <label class="control-label" for="location_p">出厂日期</label>
                    <div class="controls">
                    <input type="text"  name="time" id="datepicker1" value="2012-02-16" class="row-fluid span4"/>
                    </div>
                  </div>
                  <div class="control-group">
                    <label class="control-label" for="keyword">保修期</label>
                    <div class="controls">
                    <input type="text"   value="" name="month" id="ggkname" class="span4"/>
                    </div>
                  </div>

                  <div class="control-group">
                    <label class="control-label" for="">产品编号</label>
                    <div class="controls">
                      <table class="prizetable" style="margin-left: 80px;">
                        <thead>
                          <tr>
                            <th>起始</th>
                            <th>结束</th>
                          </tr>
                        </thead>
                        <tbody>
                          <tr>
                            <td><input type="text"   value="" name="start" id="ggkj1mc" class="span10"/></td>
                            <td><input type="text"   value="" name="stop" id="ggkj1ms" class="span10"/></td>
                          </tr>
                        </tbody>
                      </table>
                    </div>
                  </div>


              <div class="form-actions row-fluid">
                <div class="span5 offset3">
                  <button type="submit" class="btn btn-primary"><i class="fa fa-cog fa-spin"></i> 立即生成</button>

                </div>
              </div>

              {{ Form::close() }}

          </div>
        </div>
        <!-- End box -->
      </div>

@stop


@section('modals')
<div id="qrcode_city" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 class="modal-title" id="myModalLabel">城市二维码</h3>
      </div>
      <div class="modal-body">
        <div class="row-fluid">
          <div class="span6"><img src="img/qrcode_staff.jpg" /></div>
          <div class="span5"><p>您现在看到的是杭州的二维码</p><p>右键点击图片-图片另存为<br />用于印刷相关城市宣传资料</p></div>
        </div>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>

<div id="confirm_alert" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 class="modal-title" id="myModalLabel">确定本次操作吗？</h3>
      </div>
      <div class="modal-body">
        <i class=" icon-warning-sign color_red pull-left fs_24"></i>

        <p>一旦【确定】，本次操作不可撤销。</p>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary">确定</button>
      </div>
    </div>
  </div>
</div>
@stop


@section('script')
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/full-calendar/fullcalendar.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/jquery.peity.min.js') }}"></script>
<script type="text/javascript" language="javascript" src="{{ URL::asset('ad/js/plugins/datatables/js/jquery.dataTables.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/chosen/chosen/chosen.jquery.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/flot/jquery.flot.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/jquery.uniform.min.js') }}"></script>
<script src="{{ URL::asset('ad/js/plugins/justGage.1.0.1/resources/js/raphael.2.1.0.min.js') }}"></script>
<script src="{{ URL::asset('ad/js/plugins/justGage.1.0.1/resources/js/justgage.1.0.1.min.js') }}"></script>
<script src="{{ URL::asset('ad/js/scripts.js') }}"></script>


    <script type="text/javascript" charset="utf-8">
    // Datatables
    $(document).ready(function() {
      var dontSort = [];
                $('#datatable_city thead th').each( function () {
                    if ( $(this).hasClass( 'no_sort' )) {
                        dontSort.push( { "bSortable": false } );
                    } else {
                        dontSort.push( null );
                    }
      } );
      $('#datatable_city').dataTable( {
        "sDom": "<'row table_top_bar'<'row-fluid'>'<'to_hide_phone'>'f'<'>r>t<'row'>",
         "sDom": "<'row table_top_bar'<'row-fluid'<'to_hide_phone' f>>><'row'>",
         "aaSorting": [[ 1, "asc" ]],
        "bPaginate": false,
        "bJQueryUI": false,
        "aoColumns": dontSort

      } );
      $.extend( $.fn.dataTableExt.oStdClasses, {
        "s`": "dataTables_wrapper form-inline"
      } );
    } );
    </script>
@stop
